from __init__ import db
import datetime

class Post(db.Model):
    __tablename__ = 'post'
    __table_args__ = {
        'mysql_charset': 'utf8mb4'
    }
    id = db.Column(db.INT,primary_key=True,autoincrement=True)
    bankuai = db.Column()
    title = db.Column()
    content = db.Column()
    authorid = db.Column()
    level = db.Column(default=1)
    password = db.Column()
    popularity = db.Column(default=50)
    time = db.Column(default=datetime.datetime.now())
    topId = db.Column(default=None)

